Skip to content

Add a 'Close Display' action#3437

Merged
shroffk merged 2 commits into
ControlSystemStudio:masterfrom
rjwills28:issue3384-close-display-action
Jul 15, 2025
Merged

Add a 'Close Display' action#3437
shroffk merged 2 commits into
ControlSystemStudio:masterfrom
rjwills28:issue3384-close-display-action

Conversation

@rjwills28

Copy link
Copy Markdown
Contributor

I looked into adding a dedicated 'close display' action that can be used in ActionButtons. This is following my request in #3384.

As I explain in that issue, it is nice to have some redundancy in screens and so offer the user multiple ways to close the display, i.e. in addition to the 'x' at the top of the display/window. Note, that as also explained in that issue, this isn't always an option if you have 'Always show tabs' disabled and you are using split windows.

This is a simple action that just closes the current display.

Please let me know what you think?

@rjwills28

Copy link
Copy Markdown
Contributor Author

Would it be possible to get some feedback on this new feature?

@rjwills28

Copy link
Copy Markdown
Contributor Author

I have checked that all resources are tidied up by this new action to close a display and I can confirm that the method I call to close the display DockItemRepresentation.closeWindow(...):

public void closeWindow(final DisplayModel model) throws Exception

calls DockItem.prepareToClose():
which performs checks to make sure that it is OK to closer the display:
public boolean prepareToClose() throws Exception

This is the same method called when you click the cross on the top of a display, therefore I conclude that resources are cleaned up in the same way.

I have also used the PV List app in Phoebus to confirm that when you close a display using the new action in an action button, the connections to the PVs are closed and the PV List shows that no PVs are in use.

@shroffk

shroffk commented Jul 10, 2025

Copy link
Copy Markdown
Member

@rjwills28 thank you for double checking

@shroffk shroffk merged commit 5315227 into ControlSystemStudio:master Jul 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants